<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>layui</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="/wpui-admin/wp-ewallet-admin/static/plugin/layuimini/lib/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="/wpui-admin/wp-ewallet-admin/static/plugin/layuimini/css/public.css" media="all">
    <link rel="stylesheet" href="/wpui-admin/wp-ewallet-admin/static/css/wp.css" media="all">

    <style>
        .item {
            height: 50px;
            border-bottom: 1px solid #dddddd;
            line-height: 50px;
        }

        .key {
            float: left;
        }

        .value {
            float: right;
        }

        .input-block {
            margin-right: 50px;
        }

        .unit {
            position: absolute;
            right: 0px;
            top: 0px;
            right: -30px;
            line-height: 40px;
        }
    </style>
</head>
<body>
<div id="container" class="layuimini-container">
    <div class="layuimini-main">

        <h2 class="wp-module-title">提币申请详情</h2>
        <div class="wp-module-box wp-module-border">

            <div class="item">
                <div class="key">申请账户</div>
                <div class="value" v-text="accountId"></div>
            </div>

            <div class="item">
                <div class="key">提币金额</div>
                <div class="value"><span v-text="mentionAmount"></span>&nbsp;<span v-text="moneyTypeCode"></span></div>
            </div>

            <div class="item">
                <div class="key">提币地址</div>
                <div class="value" v-text="walletAddress"></div>
            </div>

            <div class="item">
                <div class="key">申请时间</div>
                <div class="value" v-text="createDate"></div>
            </div>

            <div class="item">
                <div class="key">申请单状态</div>
                <div class="value" v-show="orderStatus==1000">待处理</div>
                <div class="value" v-show="orderStatus==2000">处理完成</div>
            </div>

            <div class="item">
                <div class="key">手续费</div>
                <div class="value"><span v-text="serviceCharge"></span>&nbsp;<span v-text="moneyTypeCode"></span></div>
            </div>

            <div class="item">
                <div class="key">备注</div>
                <div class="value" v-text="remark"></div>
            </div>

        </div>

        <div class="wp-module-box" style="margin-top: 15px;border-bottom:2px solid #81BEF9;">
            <h3><b>处理信息</b></h3>
            <div class="item">
                <div class="key">处理结果</div>
                <div class="value" v-show="operResult==1000">同意</div>
                <div class="value" v-show="operResult==2000">拒绝</div>
            </div>
            <div class="item">
                <div class="key">处理人</div>
                <div class="value" v-text="operUser"></div>
            </div>
            <div class="item">
                <div class="key">处理时间</div>
                <div class="value" v-text="operTime"></div>
            </div>
            <div class="item">
                <div class="key">处理备注</div>
                <div class="value" v-text="operRemark"></div>
            </div>
        </div>

        <div class="wp-module-box" style="margin-top: 15px;border-bottom:2px solid #81BEF9;" v-show="operResult==1000">
            <h3><b>转账信息</b></h3>
            <div class="item">
                <div class="key">转出地址</div>
                <div class="value" v-text="addressFrom"></div>
            </div>
            <div class="item">
                <div class="key">转入地址</div>
                <div class="value" v-text="addressTo"></div>
            </div>
            <div class="item">
                <div class="key">矿工费</div>
                <div class="value" v-text="transferServiceCharge ? transferServiceCharge + ' ETH' : ''"></div>
            </div>
            <div class="item">
                <div class="key">转账结果</div>
                <div class="value" v-show="transResult==1000">已转待确认</div>
                <div class="value" v-show="transResult==2000">已转成功</div>
                <div class="value" v-show="transResult==3000">转账失败</div>
            </div>
            <div class="item">
                <div class="key">转账时间</div>
                <div class="value" v-text="transTime"></div>
            </div>
        </div>

    </div>
</div>

<script src="/wpui-admin/wp-ewallet-admin/static/js/jquery-3.4.1.min.js"></script>
<script src="/wpui-admin/wp-ewallet-admin/static/plugin/layuimini/lib/layui/layui.js" charset="utf-8"></script>
<script src="/wpui-admin/wp-ewallet-admin/module/index/config.js" charset="utf-8"></script>
<script src="/wpui-admin/wp-ewallet-admin/global/wp.js" charset="utf-8"></script>
<script src="/wpui-admin/wp-ewallet-admin/static/js/vue.js" charset="utf-8"></script>
<script src="/wpui-admin/wp-ewallet-admin/static/js/vue-i18n.js" charset="utf-8"></script>
<script src="/wpui-admin/wp-ewallet-admin/global/wp-i18n.js" charset="utf-8"></script>
<script src="/wpui-admin/wp-ewallet-admin/global/wp-project.js" charset="utf-8"></script>
<script>
    layui.use(['form', 'table', 'element'], function () {
        var $ = layui.jquery,
            form = layui.form,
            element = layui.element;

        var vm = new Vue({
            el: '#container',
            i18n: wp.i18n(),
            data: {
                reqOrderId:"",
                mentionAmount:"",
                walletAddress:"",
                serviceCharge:"",
                total:"",
                reqType:"",
                orderStatus:"",
                accountId:"",
                reqTypeName:"",
                remark:'',
                createDate:'',
                moneyTypeId:'',
                moneyTypeCode:'',
                operTime:"",
                address:"",
                walletAddress:"",
                operUser:"",

                // 处理结果
                operRemark:''
            },
            mounted: function () {
                this.getApplyOrder();
            },
            methods: {
                getApplyOrder:function(){
                    var that = this;
                    wp.httpGet({
                        url: wp.url("/wp/ewallet/wallet/reqOrder/id/mentionMoney"),
                        data: {
                            orderId: window.data.reqOrderId
                        },
                        success: function (data) {
                            console.log(JSON.stringify(data.dataBody));
                            $.extend(that,data.dataBody);
                            that.$nextTick(function(){
                                form.render();
                            });
                        }
                    })
                }
            }

        });

    });
</script>

</body>
</html>